<template>
  <div class="nv-news-inner">
    <div>
      <div class="nv-news-item nv-video">
        <h1 class="nv-news-tit">
         {{info.title}}
        </h1>
        <div class="cm-video">
          <div class="cm-video-box">
            <img
              :src="info.cover"
            />
          </div>
          <div class="cm-video-time"><p>{{info.duration}}</p></div>
          <i class="cm-video-icon show"></i>
        </div>
        <div class="ch-number">
          <div class="ch-num-avatar">
            <img
              :src="info.authorAvatar"
              alt=""
            />
          </div>
          <div class="ch-num-name">{{info.authorName}}</div>
          <i class="ch-num-icon"></i>
          <div class="nv-news-tipper">
            <span class="nv-news-tip-col">03-03</span
            ><span class="nv-news-circle"></span
            ><span class="nv-news-tip-col">{{info.readNum}}播放</span>
          </div>
        </div>
      </div>
    </div>
  </div>
</template>

<script>
export default {
  name: 'VueJiangduoduoComVideoItem',
  props: {
    info: {
      type: Object,
      default() {
        return {};
      },
    },
  },
  data() {
    return {};
  },

  mounted() {},

  methods: {},
};
</script>

<style lang="scss" scoped>
.nv-news-inner {
  position: relative;
  &::before {
    position: absolute;
    top: 0;
    right: 0;
    z-index: 2;
    content: "";
    width: 100%;
    height: 1px;
    background-color: #e4e4e4;
    transform: scaleY(0.5);
    transform-origin: 0 0;
  }
  .nv-news-item {
    position: relative;
    width: 100%;
    padding: 14px 0;
    display: flex;
    flex-direction: row !important;
    line-height: 1.5;
    box-sizing: border-box;
    .nv-news-tit {
      height: auto;
      margin-bottom: 9px;
      font-size: 17px;
      color: #3a3a3a;
      lines: 2;
      overflow: hidden;
      text-overflow: ellipsis;
      display: -webkit-box;
      -webkit-box-orient: vertical;
      -webkit-line-clamp: 2;
    }
    .cm-video {
      height: 193px;
      margin-bottom: 10px;
      border-radius: 6px;
      overflow: hidden;
      position: relative;
      width: 100%;
      z-index: 7;
      .cm-video-box {
        position: relative;
        width: 100%;
        height: inherit;
        img {
          width: 100%;
          height: 100%;
          object-fit: cover;
        }
      }
      .cm-video-time {
        z-index: 2;
        color: #fff;
        font-size: 10px;
        display: flex;
        align-items: flex-end;
        justify-content: flex-end;
        padding: 0 6px;
        line-height: 20px;
        background: rgba(0, 0, 0, 0.1);
        box-sizing: border-box;
        position: absolute;
        left: 0;
        top: 0;
        width: 100%;
        height: 100%;
      }
      .cm-video-icon {
        position: absolute;
        left: 50%;
        top: 50%;
        z-index: 4;
        display: none;
        background: url()
          no-repeat center center;
        background-size: contain;
        width: 42px;
        height: 42px;
        margin-top: -21px;
        margin-left: -21px;
      }
      .cm-video-icon.show {
        display: block;
      }
    }
    .ch-number {
      display: flex;
      align-items: center;
      .ch-num-avatar {
        width: 20px;
        height: 20px;
        flex-shrink: 0;
        border-radius: 50%;
        overflow: hidden;
        margin-right: 6px;
        img {
          width: 100%;
          height: 100%;
          display: block;
        }
      }
      .ch-num-name {
        margin-right: 2px;
        color: #3a3a3a;
        font-size: 15px;
        word-break: keep-all;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
      }
      .ch-num-icon {
        width: 15px;
        height: 15px;
        display: inline-block;
        flex-shrink: 0;
        background: url()
          no-repeat center center/contain;
      }
      .ch-num-icon + .nv-news-tipper {
        margin-left: 12px;
      }
      .nv-news-tipper {
        display: flex;
        flex-direction: row;
        align-items: center;
        .nv-news-tip-col {
          flex-shrink: 0;
          color: #999;
          font-size: 12px;
          display: inline-flex;
          align-items: center;
        }
        .nv-news-circle {
          width: 2px;
          height: 2px;
          border-radius: 50%;
          background-color: #d8d8d8;
          margin: 0 7px;
          display: none;
        }
        .nv-news-tip-col {
          flex-shrink: 0;
          color: #999;
          font-size: 12px;
          display: inline-flex;
          align-items: center;
          &::before {
            width: 2px;
            height: 2px;
            content: "";
            display: inline-block;
            border-radius: 50%;
            background-color: #d8d8d8;
            margin: 0 7px;
          }
        }
      }
    }
  }
  .nv-news-item.nv-video {
    display: block;
  }
}
</style>
